Ext.define('AmpleHarvest.objects.groups.window.cGroupView',
		{
			extend		: 'Ext.form.Panel',
//			id			: 'groupView',
			alias		: 'widget.ampleharvest-objects-groups-window-cgroupview',
			requires		:
				[
					'AmpleHarvest.objects.groups.window.view.cToolbar'
				],
			alias		: 'widget.groupdetail',
			title		: 'Group Details',
			frame		: true,
			iconCls		: 'window-group-pendinggroup-icon',
			
	        initComponent	: function()
			{
				var obj_This = this;
				
				this.callParent();	
				
			}, 
			
			add_admin_options	: function()
			{
				this.m_obj_Toolbar = Ext
				.create('AmpleHarvest.objects.groups.window.view.cToolbar');

				this.addDocked(this.m_obj_Toolbar, 'top');
			},
			
			set_RequestID	: function()
			{
				var obj_This = this;
				this.m_obj_Classification.initDropDowns();

				if (this.m_str_groupId)
				{
					this.load(
					{
						url		: obj_config.C_STR_EXTERNAL_PATH+'/rest/group/group.php',
						params	:
						{
							id	: this.m_str_groupId
						},
						method	: 'GET',
						waitMsg	: 'Loading Group Data',
						success	: function(obj_Response, obj_Result, obj_Type)
						{
							obj_This.m_obj_Classification.setInitClass(obj_Result.result.data.classification);
							obj_This.m_obj_Classification.setInitSCI(obj_Result.result.data.sci);
							obj_This.m_obj_Classification.setInitDistro(obj_Result.result.data.distro);
							obj_This.m_obj_Classification.initClassification();
						}
					}
					);
				}
			},
			
			make_editable	: function()
			{
				
			},
			
			add_Fields	: function()
			{
				this.m_obj_Classification = Ext.create(	
					"AmpleHarvest.objects.classification.cPanel",
					{
						m_bool_Editable				: false,
						m_str_ClassificationName	: 'classification',
						m_str_SCIName				: 'sci',
						m_str_DistroName			: 'distro'
					}
				);

				this.add(this.m_obj_Classification);
				
				this.m_obj_Form_UserID = Ext.create("Ext.form.field.Hidden",
				{
					name		: 'requester',
					readOnly	: true,
					allowBlank	: false
				}
				);
				this.m_obj_Form_UserID
						.setValue(obj_config.user.id);
				this.add(this.m_obj_Form_UserID);

				this.add(Ext.create("Ext.form.field.Text",
				{
					fieldLabel	: 'Name',
					name		: "name",
					inputType	: "textfield",
					readOnly	: true,
					
					frame		: false,
					anchor		: '100%',
					allowBlank	: false
				}
				));
				
				this.add(Ext.create("Ext.form.field.TextArea",
				{
					fieldLabel	: 'Description',
					name		: 'description',
					inputType	: "textfield",
					readOnly	: true,
					anchor		: '100%',
					allowBlank	: false
				}
				));

				this.add(Ext.create("Ext.form.field.TextArea",
				{
					fieldLabel	: 'Justification',
					name		: 'justification',
					allowBlank	: false,
					allowBlank	: false,
					readOnly	: true,
					anchor		: '100%'
				}
				));

//				this.add(Ext.create("Ext.panel.Panel",
//				{
//					frame	: true,
//					border	: "0",
//					html	: '* Field labels "<span style="color:red"><u>red</u></span>" are required, Also you must select either Whole Site or Enter Keywords.'
//				}
//				));
			}
    	});